﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PatternLib.Responsibility
{
    public class Director : ResponsibilityChain
    {
        public Director()
        { 
           this.Name = "主管"; 
        }
        public override void Execute(ResponsibilityNode applyContext)
        {
            Console.WriteLine($"this is {GetType().Name} 来审核");
             
            if (applyContext.Hour <= 8)
            {
                applyContext.AuditResult = true;
            }
            else
            { 
                NextStep(applyContext);
            }
        }
        /// <summary>
        /// 处理业务
        /// </summary>
        /// <returns></returns>
        private bool DoSomeThing()
        {
            return true;
        }
    }
}
